chore: Mark UTFSequence as deprecated to remove in the future#57122
chore: Mark UTFSequence as deprecated to remove in the future#57122retyui wants to merge 1 commit into
Conversation
|
@javache has imported this pull request. If you are a Meta employee, you can view this in D108005122. |
| get UTFSequence() { | ||
| warnOnce( | ||
| 'utfsequence-will-be-remove', | ||
| 'UTFSequence will be removed in a future release.', |
There was a problem hiding this comment.
Can we add a line on what the user should use instead?
There was a problem hiding this comment.
I can add, what do @cortinico think can be used instead ?
| 'utfsequence-will-be-remove', | ||
| 'UTFSequence will be removed in a future release.', |
There was a problem hiding this comment.
Suggested wording:
| 'utfsequence-will-be-remove', | |
| 'UTFSequence will be removed in a future release.', | |
| 'utfsequence-deprecated', | |
| "UTFSequence has been deprecated and will be removed in a future release. Please insert Unicode escape sequences directly, e.g. `'\\ufeff'` (BOM)", |
Can we also add an @deprecated JSDoc annotation to the object itself?:
react-native/packages/react-native/Libraries/UTFSequence.js
Lines 22 to 23 in 9d03750
There was a problem hiding this comment.
@huntie


smth is wrong with repo, I can't push my changes or make a fork
There was a problem hiding this comment.
Ah, yup this is a temporary ongoing thing after the repo move. Please try again in a few hours 🙏🏻
Summary:
if you check the search results you won't find any usages of
UTFSequencemodule. Also it wasn't documented.So, it can be treated as dead-code and needs to be removed from RN package
In RN repo in used in one places and can be replaced with string litaral:
react-native/packages/react-native/Libraries/LogBox/Data/parseLogBoxLog.js
Line 109 in 8bcfb3b
Changelog:
[GENERAL] [DEPRECATED] - Mark undocumented
UTFSequencemodule as deprecatedTest Plan:
...